3.375 \(\int \frac{3+\tan (x)}{\sqrt{4+3 \tan (x)}} \, dx\)

Optimal. Leaf size=30 \[ -\sqrt{2} \tan ^{-1}\left (\frac{1-3 \tan (x)}{\sqrt{2} \sqrt{3 \tan (x)+4}}\right ) \]

[Out]

-(Sqrt[2]*ArcTan[(1 - 3*Tan[x])/(Sqrt[2]*Sqrt[4 + 3*Tan[x]])])

________________________________________________________________________________________

Rubi [A]  time = 0.0306788, antiderivative size = 30, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.133, Rules used = {3535, 203} \[ -\sqrt{2} \tan ^{-1}\left (\frac{1-3 \tan (x)}{\sqrt{2} \sqrt{3 \tan (x)+4}}\right ) \]

Antiderivative was successfully verified.

[In]

Int[(3 + Tan[x])/Sqrt[4 + 3*Tan[x]],x]

[Out]

-(Sqrt[2]*ArcTan[(1 - 3*Tan[x])/(Sqrt[2]*Sqrt[4 + 3*Tan[x]])])

Rule 3535

Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])/Sqrt[(a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[(-2*
d^2)/f, Subst[Int[1/(2*b*c*d - 4*a*d^2 + x^2), x], x, (b*c - 2*a*d - b*d*Tan[e + f*x])/Sqrt[a + b*Tan[e + f*x]
]], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && EqQ[2
*a*c*d - b*(c^2 - d^2), 0]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{3+\tan (x)}{\sqrt{4+3 \tan (x)}} \, dx &=-\left (2 \operatorname{Subst}\left (\int \frac{1}{2+x^2} \, dx,x,\frac{1-3 \tan (x)}{\sqrt{4+3 \tan (x)}}\right )\right )\\ &=-\sqrt{2} \tan ^{-1}\left (\frac{1-3 \tan (x)}{\sqrt{2} \sqrt{4+3 \tan (x)}}\right )\\ \end{align*}

Mathematica [C]  time = 0.172503, size = 69, normalized size = 2.3 \[ \left (\frac{1}{5}-\frac{3 i}{5}\right ) \sqrt{4-3 i} \tanh ^{-1}\left (\frac{\sqrt{3 \tan (x)+4}}{\sqrt{4-3 i}}\right )+\left (\frac{1}{5}+\frac{3 i}{5}\right ) \sqrt{4+3 i} \tanh ^{-1}\left (\frac{\sqrt{3 \tan (x)+4}}{\sqrt{4+3 i}}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(3 + Tan[x])/Sqrt[4 + 3*Tan[x]],x]

[Out]

(1/5 - (3*I)/5)*Sqrt[4 - 3*I]*ArcTanh[Sqrt[4 + 3*Tan[x]]/Sqrt[4 - 3*I]] + (1/5 + (3*I)/5)*Sqrt[4 + 3*I]*ArcTan
h[Sqrt[4 + 3*Tan[x]]/Sqrt[4 + 3*I]]

________________________________________________________________________________________

Maple [B]  time = 0.095, size = 54, normalized size = 1.8 \begin{align*} \sqrt{2}\arctan \left ({\frac{\sqrt{2}}{2} \left ( 2\,\sqrt{4+3\,\tan \left ( x \right ) }+3\,\sqrt{2} \right ) } \right ) +\sqrt{2}\arctan \left ({\frac{\sqrt{2}}{2} \left ( 2\,\sqrt{4+3\,\tan \left ( x \right ) }-3\,\sqrt{2} \right ) } \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((3+tan(x))/(4+3*tan(x))^(1/2),x)

[Out]

2^(1/2)*arctan(1/2*(2*(4+3*tan(x))^(1/2)+3*2^(1/2))*2^(1/2))+2^(1/2)*arctan(1/2*(2*(4+3*tan(x))^(1/2)-3*2^(1/2
))*2^(1/2))

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\tan \left (x\right ) + 3}{\sqrt{3 \, \tan \left (x\right ) + 4}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((3+tan(x))/(4+3*tan(x))^(1/2),x, algorithm="maxima")

[Out]

integrate((tan(x) + 3)/sqrt(3*tan(x) + 4), x)

________________________________________________________________________________________

Fricas [A]  time = 1.03952, size = 93, normalized size = 3.1 \begin{align*} \sqrt{2} \arctan \left (\frac{3 \, \sqrt{2} \tan \left (x\right ) - \sqrt{2}}{2 \, \sqrt{3 \, \tan \left (x\right ) + 4}}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((3+tan(x))/(4+3*tan(x))^(1/2),x, algorithm="fricas")

[Out]

sqrt(2)*arctan(1/2*(3*sqrt(2)*tan(x) - sqrt(2))/sqrt(3*tan(x) + 4))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\tan{\left (x \right )} + 3}{\sqrt{3 \tan{\left (x \right )} + 4}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((3+tan(x))/(4+3*tan(x))**(1/2),x)

[Out]

Integral((tan(x) + 3)/sqrt(3*tan(x) + 4), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\tan \left (x\right ) + 3}{\sqrt{3 \, \tan \left (x\right ) + 4}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((3+tan(x))/(4+3*tan(x))^(1/2),x, algorithm="giac")

[Out]

integrate((tan(x) + 3)/sqrt(3*tan(x) + 4), x)